package com.tao.util;

import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.junit.Test;

import com.tao.util.pack.send.SendHttpUtil;


public class Utils {

	@Test
	public void test(){
		System.out.println(getDeviceID());
	}
	
	public static String getDeviceID(){
		double random = Math.random();
		DecimalFormat decimalFormat = new DecimalFormat("0.000000000000000");
		String deviceIDString = decimalFormat.format(random);
		return "e"+deviceIDString.substring(2,17);
	}
	public static String getSystemTime(){
		Date date = new Date();
		DateFormat format  = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		return format.format(date).toString();
	}
	
	
	public static void main(String[] args) {
		new SendHttpUtil().start();;
		System.out.println(Utils.getDeviceID());
		System.out.println(Utils.getSystemTime());
	}
}